{% extends 'layout.html' %}

{% load static %}

{% block css %}
    <link rel="stylesheet" href="{% static 'plugins/bootstrap-datepicker-722dc29/dist/css/bootstrap-datepicker.min.css' %}">
{% endblock %}

{% block content %}
    <div class="panel panel-default container">
        <div class="panel-body">
                    <p>Some default panel content here. Nulla vitae elit libero, a pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
        </div>
        <form method="post" novalidate>
            {% csrf_token %}
            {% for field in form %}
                <div class="form-group">
                    {{ field.label }}: {{ field }}
                    <span style="color: red">{{ field.errors.0 }}</span>
                </div>
            {% endfor %}
            <button type="submit" class="btn btn-primary">提 交</button>
        </form>
    </div>
{% endblock %}

{% block js %}
   <script src="{% static 'plugins/bootstrap-datepicker-722dc29/dist/js/bootstrap-datepicker.min.js' %}"></script>
    <script src="{% static 'plugins/bootstrap-datepicker-722dc29/dist/locales/bootstrap-datepicker.zh-CN.min.js' %}"></script>
    <script>
     // 选择日期 django自动给于id值
        jQuery('#id_create_time').each(function () {
            var $input = jQuery(this);
            $input.datepicker({
                todayHighlight: true,
                defaultViewDate:'today',
                language: 'zh-CN',
                    });
                })
    </script>
{% endblock %}



